#pragma once
#include <cocos2d.h>
#include "BaseObject.h"
#include "Enemy.h"

USING_NS_CC;
#define DEFAULT_DIRECT ccp(0, 1)

class Bullet : public BaseObject
{
public:
	Bullet(void);
	~Bullet(void);

	virtual bool init();
	virtual void onShot(BaseObject* enemy);
	virtual void updatePosition(float dt);
	virtual void onEnter();
	virtual void onExit();
	void reset();
	void updateDirect();
	

	CC_PROPERTY(CCPoint, _velocity, Velocity);
	CC_SYNTHESIZE(bool, _isRotateByDirect, IsRotateByDirect);
	CC_SYNTHESIZE(CCPoint, _acceleration, Acceleration);
	CC_SYNTHESIZE(int, _damage, Damage);
	CC_SYNTHESIZE(bool, _isShot, IsShot);
	CC_SYNTHESIZE_RETAIN(CCString*, _id, Id);
	CC_SYNTHESIZE_RETAIN(CCObject*, _IdWave, IdWave);

	CREATE_FUNC(Bullet);
};

